import { post } from '@/utils/http'

// 更新会员驾驶证附件
export const uploadDriverFileAPI = (data) => post({ url: '/V5/czcCustMember/uploadDriverFile', data })
// 获取门店详情
export const getSiteLeaseDetailAPI = (data) => post({ url: '/V5/siteLease/siteDetail', data })
// 获取门店对应模板详情
export const getStoreTemplateAPI = (data) => post({ url: '/V5/tenantCostTemplate/selectBySiteId', data })
// 查看日历
export const getPriceCalendarAPI = (data) => post({ url: '/V5/tenantPriceTemplate/getCalendar', data })
// 获取还车门店列表
export const getSiteLeaseListAPI = (data) => post({ url: '/V5/siteLease/getSiteList', data })
// 短租订单-列表
export const getListAPI = (data) => post({ url: '/V5/sOrder/pageList', data })
// 短租订单-单量统计
export const findStatisticsAPI = (data) => post({ url: '/V5/sOrder/findStatistics', data })
// 交/还车人维护
export const editGiveReturnStaffAPI = (data) => post({ url: '/V5/sOrder/editGiveReturnStaff', data })
// 订单完成前校验
export const finishCheckAPI = (data) => post({ url: '/V5/sOrder/finishCheck', data })
// 完成订单
export const finishAPI = (data) => post({ url: '/V5/sOrder/finish', data })
// 取消订单
export const cancelOrderAPI = (data) => post({ url: '/V5/sOrder/cancel', data })
// 作废订单
export const invalidOrderAPI = (data) => post({ url: '/V5/sOrder/invalidOrder', data })
// 根据手机号查询
export const findByPhoneAPI = (data) => post({ url: '/V5/czcCustMember/findByPhone', data })
// 计算租期
export const computeRentDayAPI = (data) => post({ url: '/V5/sOrder/computeRentDay', data })
// 短租订单-详情
export const getShortOrdrDetailsAPI = (data) => post({ url: '/V5/sOrder/detail', data })
// 短租订单-订单费用信息
export const getShortOrdrFeeDetailAPI = (data) => post({ url: '/V6/sOrder/orderFeeDetailList', data })
// 短租订单-订单费用信息
export const getShortOrdrReletListAPI = (data) => post({ url: '/V5/sOrder/reletList', data })
// 短租订单-获取账号前置信息收付款方式
export const getAccountByPageDataAPI = (data) => {
  // 忽略退款抵扣违约金,需要显示 => 请加字段frontIsIgnore
  if ([undefined, null].includes(data.frontIsIgnore)) {
    data.ignoreWays = ['-2']
  }
  return post({ url: '/V5/inExpAccount/getWayByType', data })
}
// 短租订单-根据收付款方式和收付款类型查询账号信息
export const getAccountByWayAndTypeAPI = (data) => post({ url: '/V5/inExpAccount/getAccountByWayAndType', data })
// 短租订单-费用信息 - 去确认
export const feetoConfirmAPI = (data) => post({ url: '/V5/orderFee/toConfirm', data })
// 短租订单-费用信息 - 确认
export const feeSubmitAPI = (data) => post({ url: '/V5/orderFee/confirm', data })
// 短租订单-换车记录
export const carReplaceListAPI = (data) => post({ url: '/V5/sOrder/replaceList', data })
// 短租订单-计算订单相关的金额
export const calcPriceAPI = (data) => post({ url: '/V5/sOrder/calcPrice', data })
// 创建订单
export const createOrderAPI = (data) => post({ url: '/V5/sOrder/createOrder', data })
// 订单交车
export const giveCarAPI = (data) => post({ url: '/V5/sOrder/giveCar', data })
// 订单还车
export const returnCarAPI = (data) => post({ url: '/V5/sOrder/returnCar', data })
// 订单续租
export const reletOrderAPI = (data) => post({ url: '/V5/sOrder/reletOrder', data })
// 获取押金的可用金额
export const queryActiveAmountAPI = (data) => post({ url: '/V5/sOrderDeposit/queryActiveAmount', data })
// 订单换车
export const replaceCarAPI = (data) => post({ url: '/V5/sOrder/replaceCar', data })
// 添加费用
export const addOrderCostAPI = (data) => post({ url: '/V5/sOrder/addOrderCost', data })
// 修改承租人
export const editMemberInfoAPI = (data) => post({ url: '/V5/sOrder/editMemberInfo', data })
// 修改订单
export const modifyOrderAPI = (data) => post({ url: '/V5/sOrder/modifyOrder', data })
// 费用详情
export const orderFeeDetailAPI = (data) => post({ url: '/V5/orderFee/detail', data })
// 修改费用
export const modifyOrderFeeAPI = (data) => post({ url: '/V5/orderFee/modify', data })
// 排车校验
export const platoonCarCheckAPI = (data: any) => post({ url: '/V5/carStock/checkCarStock', data })
// 获取费用rate
export const calcRateAPI = (data: any) => post({ url: '/V5/sOrder/calcRate', data })

// 修改同步库存状态
export const updateSyncStatusAPI = (data: any) => post({ url: '/V5/channelAccount/changeSyncStoreStatus', data })

// 变更状态
export const changeStatusAPI = (data: any) => post({ url: '/V5/channelAccount/changeStatus', data })

// 详情
export const getDetailAPI = (data: any) =>
  post({
    url: '/V5/channelAccount/detail',
    data,
    header: {
      needLoading: false,
    },
  })

// 同步订单
export const syncOrderAPI = (data: any) => post({ url: '/V5/channelAccount/syncOta', data })

// 编辑账号信息
export const editAccountAPI = (data: any) => post({ url: '/V5/channelAccount/save', data })

// 账号验证
export const checkAccountAPI = (data: any) => post({ url: '/V5/channelAccount/loginVerify', data })

// 账号验证验证校验短信验证码
export const checkAccountCodeAPI = (data: any) => post({ url: '/V5/channelAccount/loginVerifySmsCode', data })

// 账号验证终止
export const checkAccountStopAPI = (data: any) => post({ url: '/V5/channelAccount/verifyStop', data })

// 判断车牌号修改还是新增
export const channelCarLicenseDetail = (data: any) => post({ url: '/V5/channelAccount/license/channelCarLicenseDetail', data })

// 渠道车牌保存
export const saveLicense = (data: any) => post({ url: '/V5/channelAccount/license/save', data })

// 修改车辆信息（渠道订单生成电子合同时）
export const editOrderCarInfo = (data: any) => post({ url: '/V5/sOrder/editOrderCarInfo', data })

// 手动生成电子合同
export const createQysContract = (data: any) => post({ url: '/V5/svmsContract/manualCreateQysContract', data })

// 费用信息筛选项(订单)
export const costScreenOrder = (data: any) => post({ url: '/V5/orderFee/getEnums', data })

// 费用信息筛选项(车辆)
export const costScreenCar = (data: any) => post({ url: '/V5/carAssetFee/getEnums', data })

// 自驾长/短租车型价格系统模板费用回填校验
export const inspectPrice = (data) => post({ url: '/V5/czsOrderInfo/inspectPrice', data })

// 合同信息详情
export const getShortContractOrderDetail = (data) => post({ url: '/V5/sOrder/contractOrderDetail', data })

// 更新会员身份证明
export const uploadIdCardFileAPI = (data) => post({ url: '/V5/czcCustMember/uploadIdCardFile', data })

/** 修改续租 */
export const modifyReletAPI = (data: any) => post({ url: '/V5/sOrder/updateRelet', data })
/** 删除续租 */
export const deleteReletAPI = (data: any) => post({ url: '/V5/sOrder/deleteRelet', data })
/** 续租校验 */
export const reletCheckAPI = (data: any) => post({ url: '/V5/sOrder/modifyRerentCheck', data })

/** 换/还车校验 */
export const checkExistEtcOrderApi = (data: any) => post({ url: '/V5/etcOrder/checkExistEtcOrder', data })

/** 修改车牌号 */
export const updateCarLicenseNo = (data: any) => post({ url: '/V5/sOrder/updateCarLicenseNo', data })
/** 订单好评 */
export const orderGoodEvaluate = (data: any) => post({ url: '/V5/sOrder/orderPositiveReviews', data })

/** 获取未好评订单 */
export const getNoEvaluateOrder = (data: any) => post({ url: '/V5/sOrder/getPositiveReviewsAllList', data })
/** 拦截业务单虚拟车钥匙 */
export const getInterceptRefControl = (data: any) => post({ url: '/V5/carControl/interceptRefControl', data })
/** 重新下发车钥匙 */
export const getReCarKey = (data: any) => post({ url: '/V5/carControl/ReCarKey', data })
/** 发送控车钥匙短信 */
export const getCarControlSms = (data: any) => post({ url: '/V5/carControl/sendSms', data })

/** 添加自定义标签 */
export const addCustomTag = (data: any) => post({ url: '/V5/sOrder/addCustomLabel', data })
/** 备注操作记录 */
export const getRemarkLogApi = (data: any) => post({ url: '/V5/sOrder/operateRemarkLogList', data })

/** 修改换车备注 */
export const updateRemarkLogApi = (data: any) => post({ url: '/V5/sOrder/modifyReplaceCarRemark', data })

/** 添加订单备注 */
export const createRemarkApi = (data: any) => post({ url: '/V5/sOrder/createOrderRemark', data })

// 获取押金收取方式
export const getDepositType = (data: any) => post({ url: '/V5/sOrder/getViolationDepositFee', data })

// 修改对账金额
export const orderFeeModify = (data: any) => post({ url: '/V6/orderFee/modify', data })

// 添加费用备注
export const orderFeeAddRemark = (data: any) => post({ url: '/V5/orderFee/createRemark', data })

// 数据汇总
export const getStatisticsData = (data: any) => post({ url: '/V6/sOrder/orderFeeStatistics', data })

// 备注列表
export const getRemarkList = (data: any) => post({ url: '/V5/orderFee/remarkLogList', data })

// 去结算 v6
export const orderFeeToConfirm = (data: any) => post({ url: '/V6/orderFee/toConfirm', data })

// 已结算费用退款
export const orderFeeRefund = (data: any) => post({ url: '/V6/orderFee/selectGroupFee', data })

// 删除
export const orderFeeDelete = (data: any) => post({ url: '/V6/orderFee/delete', data })

// 核实订单
export const verifyOrderApi = (data: any) => post({ url: '/V5/sOrder/orderAuditing', data })

// 撤销结算
export const rejectShortOrderBill = (data: any) => post({ url: '/V5/shortOrderBill/rejectBill', data })

// 修改换车时间
export const updateChangeCarTime = (data: any) => post({ url: '/V5/sOrder/modifyReplaceTime', data })

// 获取冻结中的押金
export const getFreezeOrderCount = (data: any) => post({ url: '/V5/sOrder/getFreezeOrderCount', data })

// 查看免押码信息
export const getFreeDepositCodeInfo = (data: any) => post({ url: '/V5/sOrder/getFreeDepositCodeInfo', data })

// 获取免押码二维码
export const getFreeDepositCode = (data: any) => post({ url: '/V5/sOrder/getFreeDepositCode', data })

// 修改押金
export const changeDepositAmount = (data: any) => post({ url: '/V5/sOrder/changeDepositAmount', data })

// 获取押金详情V5
export const getSOrderDepositDetail = (data: any) => post({ url: '/V5/sOrderDeposit/detailV5', data })

// 获取押金扣款详情
export const getCutPaymentDetail = (data: any) => post({ url: '/V5/sOrderDeposit/cutPaymentDetail', data })

// 押金操作验证
export const checkDepositOperate = (data: any) => post({ url: '/V5/sOrderDeposit/depositOperationValidate', data })

//解冻押金
export const thawDeposit = (data: any) => post({ url: '/V5/sOrderDeposit/unfreezeDeposit', data })

// 租车转违章
export const changeDeposit = (data: any) => post({ url: '/V5/sOrderDeposit/changeDeposit', data })

// 押金扣款-获取租车费用
export const getOrderFeeList = (data: any) => post({ url: '/V5/sOrderDeposit/getCarFeeDetail', data })

// 押金扣款-获取违章费用
export const getViolationFeeList = (data: any) => post({ url: '/V5/sOrderDeposit/getViolationFeeListByMemberId', data })

// 押金扣款
export const cutPayment = (data: any) => post({ url: '/V5/sOrderDeposit/cutPayment', data })
